

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  
  <title>Beginner’s Guide &mdash; Ceph Documentation</title>
  

  
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/ceph.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
  <link rel="stylesheet" href="../../_static/css/custom.css" type="text/css" />

  
  

  
  

  

  
  <!--[if lt IE 9]>
    <script src="../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/jquery.js"></script>
        <script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
        <script src="../../_static/doctools.js"></script>
        <script src="../../_static/sphinx_highlight.js"></script>
    
    <script type="text/javascript" src="../../_static/js/theme.js"></script>

    
    <link rel="index" title="Index" href="../../genindex/" />
    <link rel="search" title="Search" href="../../search/" />
    <link rel="next" title="硬件推荐" href="../hardware-recommendations/" />
    <link rel="prev" title="Ceph 简介" href="../" /> 
</head>

<body class="wy-body-for-nav">

   
  <header class="top-bar">
    <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../">Ceph 简介</a></li>
      <li class="breadcrumb-item active">Beginner’s Guide</li>
      <li class="wy-breadcrumbs-aside">
            <a href="../../_sources/start/beginners-guide.rst.txt" rel="nofollow"> View page source</a>
      </li>
  </ul>
  <hr/>
</div>
  </header>
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search"  style="background: #eee" >
          

          
            <a href="../../" class="icon icon-home"> Ceph
          

          
          </a>

          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../search/" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../">Ceph 简介</a><ul class="current">
<li class="toctree-l2 current"><a class="current reference internal" href="#">入门指南</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#components-of-ceph">Components of Ceph</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#storage-interfaces">Storage Interfaces</a></li>
<li class="toctree-l4"><a class="reference internal" href="#storage-manager-what-is-it">Storage Manager: What is It?</a></li>
<li class="toctree-l4"><a class="reference internal" href="#ceph-monitor">Ceph Monitor</a></li>
<li class="toctree-l4"><a class="reference internal" href="#manager">MANAGER</a></li>
<li class="toctree-l4"><a class="reference internal" href="#osd">OSD</a></li>
<li class="toctree-l4"><a class="reference internal" href="#pools">POOLS</a></li>
<li class="toctree-l4"><a class="reference internal" href="#placement-groups">PLACEMENT GROUPS</a></li>
<li class="toctree-l4"><a class="reference internal" href="#mds">MDS</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#vstart-cluster-installation-and-configuration-procedure">Vstart Cluster Installation and Configuration Procedure</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#links">LINKS</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../hardware-recommendations/">硬件推荐</a></li>
<li class="toctree-l2"><a class="reference internal" href="../os-recommendations/">操作系统推荐</a></li>
<li class="toctree-l2"><a class="reference internal" href="../get-involved/">加入 Ceph 社区！</a></li>
<li class="toctree-l2"><a class="reference internal" href="../documenting-ceph/">贡献 Ceph 文档</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../install/">安装 Ceph</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephadm/">Cephadm</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rados/">Ceph 存储集群</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../cephfs/">Ceph 文件系统</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../rbd/">Ceph 块设备</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../radosgw/">Ceph 对象网关</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/">Ceph 管理器守护进程</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mgr/dashboard/">Ceph 仪表盘</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../monitoring/">监控概览</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api/">API 文档</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../architecture/">体系结构</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/developer_guide/">开发者指南</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../dev/internals/">Ceph 内幕</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../governance/">项目管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../foundation/">Ceph 基金会</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../ceph-volume/">ceph-volume</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/general/">Ceph 版本（总目录）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../releases/">Ceph 版本（索引）</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../security/">Security</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../hardware-monitoring/">硬件监控</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary/">Ceph 术语</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../jaegertracing/">Tracing</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../translation_cn/">中文版翻译资源</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../">Ceph</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
<div id="dev-warning" class="admonition note">
  <p class="first admonition-title">Notice</p>
  <p class="last">This document is for a development version of Ceph.</p>
</div>
  <div id="docubetter" align="right" style="padding: 5px; font-weight: bold;">
    <a href="https://pad.ceph.com/p/Report_Documentation_Bugs">Report a Documentation Bug</a>
  </div>

  
  <section id="beginner-s-guide">
<h1>Beginner’s Guide<a class="headerlink" href="#beginner-s-guide" title="Permalink to this heading"></a></h1>
<p>The purpose of A Beginner’s Guide to Ceph is to make Ceph comprehensible.</p>
<p>Ceph is a clustered and distributed storage manager. If that’s too cryptic,
then just think of Ceph as a computer program that stores data and uses a
network to make sure that there is a backup copy of the data.</p>
<section id="components-of-ceph">
<h2>Components of Ceph<a class="headerlink" href="#components-of-ceph" title="Permalink to this heading"></a></h2>
<section id="storage-interfaces">
<h3>Storage Interfaces<a class="headerlink" href="#storage-interfaces" title="Permalink to this heading"></a></h3>
<p>Ceph offers several “storage interfaces”, which is another
way of saying “ways of storing data”. These storage interfaces include:
- CephFS (a file system)
- RBD (block devices)
- RADOS (an object store).</p>
<p>Deep down, though, all three of these are really RADOS object stores. CephFS
and RBD are just presenting themselves as file systems and block devices.</p>
</section>
<section id="storage-manager-what-is-it">
<h3>Storage Manager: What is It?<a class="headerlink" href="#storage-manager-what-is-it" title="Permalink to this heading"></a></h3>
<p>Ceph is a clustered and distributed storage manager that offers data
redundancy. This sentence might be too cryptic for first-time readers of the
Ceph Beginner’s Guide, so let’s explain all of the terms in it:</p>
<ul class="simple">
<li><p><strong>Storage Manager.</strong> Ceph is a storage manager. This means that Ceph is
software that helps storage resources store data. Storage resources come in
several forms: hard disk drives (HDD), solid-state drives (SSD), magnetic
tape, floppy disks, punched tape, Hollerith-style punch cards, and magnetic
drum memory are all forms of storage resources. In this beginner’s guide,
we’ll focus on hard disk drives (HDD) and solid-state drives (SSD).</p></li>
<li><p><strong>Clustered storage manager.</strong> Ceph is a clustered storage manager. That
means that the storage manager installed not just on a single machine but on
several machines that work together as a system.</p></li>
<li><p><strong>Distributed storage manager.</strong> Ceph is a clustered and distributed storage
manager. That means that the data that is stored and the infrastructure that
supports it is spread across multiple machines and is not centralized in a
single machine. To better understand what distributed means in this context,
it might be helpful to describe what it is not: it is not a system ISCSI,
which is a system that exposes a single logical disk over the network in a
1:1 (one-to-one) mapping.</p></li>
<li><p><strong>Data Redundancy.</strong> Having a second copy of your data somewhere.</p></li>
</ul>
</section>
<section id="ceph-monitor">
<h3>Ceph Monitor<a class="headerlink" href="#ceph-monitor" title="Permalink to this heading"></a></h3>
<p>The Ceph Monitor is one of the daemons essential to the functioning of a Ceph
cluster. Monitors know the location of all the data in the Ceph cluster.
Monitors maintain maps of the cluster state, and those maps make it possible
for Ceph daemons to work together. These maps include the monitor map, the OSD
map, the MDS map, and the CRUSH map. Three monitors are required to reach
quorum. Quorum is a state that is necessary for a Ceph cluster to work
properly. Quorum means that a majority of the monitors are in the “up” state.</p>
</section>
<section id="manager">
<h3>MANAGER<a class="headerlink" href="#manager" title="Permalink to this heading"></a></h3>
<p>The manager balances the data in the Ceph cluster, distributing load evenly so
that no part of the cluster gets overloaded. The manager is one of the daemons
essential to the functioning of the Ceph cluster. Managers keep track of
runtime metrics, system utilization, CPU performance, disk load, and they host
the Ceph dashboard web GUI.</p>
</section>
<section id="osd">
<h3>OSD<a class="headerlink" href="#osd" title="Permalink to this heading"></a></h3>
<p>Object Storage Daemons (OSDs) store objects.</p>
<p>An OSD is a process that runs on a storage server. The OSD is responsible for
managing a single unit of storage, which is usually a single disk.</p>
</section>
<section id="pools">
<h3>POOLS<a class="headerlink" href="#pools" title="Permalink to this heading"></a></h3>
<p>A pool is an abstraction that can be designated as either “replicated” or
“erasure coded”. In Ceph, the method of data protection is set at the pool
level. Ceph offers and supports two types of data protection: replication and
erasure coding. Objects are stored in pools. “A storage pool is a collection of
storage volumes. A storage volume is the basic unit of storage, such as
allocated space on a disk or a single tape cartridge. The server uses the
storage volumes to store backed-up, archived, or space-managed files.” (IBM
Tivoli Storage Manager, Version 7.1, “Storage Pools”)</p>
</section>
<section id="placement-groups">
<h3>PLACEMENT GROUPS<a class="headerlink" href="#placement-groups" title="Permalink to this heading"></a></h3>
<p>Placement groups are a part of pools.</p>
</section>
<section id="mds">
<h3>MDS<a class="headerlink" href="#mds" title="Permalink to this heading"></a></h3>
<p>A metadata server (MDS) is necessary for the proper functioning of CephFS.
See <a class="reference internal" href="../../cephadm/services/mds/#orchestrator-cli-cephfs"><span class="std std-ref">Deploy CephFS</span></a> and <a class="reference internal" href="../../architecture/#arch-cephfs"><span class="std std-ref">Ceph 文件系统</span></a>.</p>
</section>
</section>
<section id="vstart-cluster-installation-and-configuration-procedure">
<h2>Vstart Cluster Installation and Configuration Procedure<a class="headerlink" href="#vstart-cluster-installation-and-configuration-procedure" title="Permalink to this heading"></a></h2>
<ol class="arabic">
<li><p>Clone the <code class="docutils literal notranslate"><span class="pre">ceph/ceph</span></code> repository:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><style type="text/css">
span.prompt1:before {
  content: "# ";
}
</style><span class="prompt1">git<span class="w"> </span>clone<span class="w"> </span>git@github.com:ceph/ceph</span>
</pre></div></div></li>
<li><p>Update the submodules in the <code class="docutils literal notranslate"><span class="pre">ceph/ceph</span></code> repository:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">git<span class="w"> </span>submodule<span class="w"> </span>update<span class="w"> </span>--init<span class="w"> </span>--recursive<span class="w"> </span>--progress</span>
</pre></div></div></li>
<li><p>Run <code class="docutils literal notranslate"><span class="pre">install-deps.sh</span></code> from within the directory into which you cloned the
<code class="docutils literal notranslate"><span class="pre">ceph/ceph</span></code> repository:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">./install-deps.sh</span>
</pre></div></div></li>
<li><p>Install the <code class="docutils literal notranslate"><span class="pre">python3-routes</span></code> package:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">apt<span class="w"> </span>install<span class="w"> </span>python3-routes</span>
</pre></div></div></li>
<li><p>Move into the <code class="docutils literal notranslate"><span class="pre">ceph</span></code> directory. You will know that you are in the correct
directory if it contains the file <code class="docutils literal notranslate"><span class="pre">do_cmake.sh</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1"><span class="nb">cd</span><span class="w"> </span>ceph</span>
</pre></div></div></li>
<li><p>Run the <code class="docutils literal notranslate"><span class="pre">do_cmake.sh</span></code> script:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">./do_cmake.sh</span>
</pre></div></div></li>
<li><p>The <code class="docutils literal notranslate"><span class="pre">do_cmake.sh</span></code> script creates a <code class="docutils literal notranslate"><span class="pre">build/</span></code> directory. Move into the
<code class="docutils literal notranslate"><span class="pre">build/</span></code> directory:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1"><span class="nb">cd</span><span class="w"> </span>build</span>
</pre></div></div></li>
<li><p>Use <code class="docutils literal notranslate"><span class="pre">ninja</span></code> to build the development environment:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ninja<span class="w"> </span>-j3</span>
</pre></div></div><div class="admonition note">
<p class="admonition-title">Note</p>
<p>This step takes a long time to run. The <code class="docutils literal notranslate"><span class="pre">ninja</span> <span class="pre">-j3</span></code> command
kicks off a process consisting of 2289 steps. This step took over three
hours when I ran it on an Intel NUC with an i7 in September of 2024.</p>
</div>
</li>
<li><p>Install the Ceph development environment:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ninja<span class="w"> </span>install</span>
</pre></div></div><p>This step does not take as long as the previous step.</p>
</li>
<li><p>Build the vstart cluster:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">ninja<span class="w"> </span>vstart</span>
</pre></div></div></li>
<li><p>Start the vstart cluster:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span class="prompt1">../src/vstart.sh<span class="w"> </span>--debug<span class="w"> </span>--new<span class="w"> </span>-x<span class="w"> </span>--localhost<span class="w"> </span>--bluestore</span>
</pre></div></div><div class="admonition note">
<p class="admonition-title">Note</p>
<p>Run this command from within the <code class="docutils literal notranslate"><span class="pre">ceph/build</span></code> directory.</p>
</div>
</li>
</ol>
<section id="links">
<h3>LINKS<a class="headerlink" href="#links" title="Permalink to this heading"></a></h3>
<ol class="arabic simple">
<li><p><a class="reference external" href="https://tracker.ceph.com/projects/ceph/wiki">Ceph Wiki (requires Ceph Redmine Tracker account)</a></p></li>
<li><p><a class="reference external" href="https://www.youtube.com/watch?v=PmLPbrf-x9g">Sage Weil’s 27 June 2019 “Intro To Ceph” tech talk (1h27m)</a></p></li>
<li><p><a class="reference external" href="https://www.youtube.com/watch?v=szE4Hg1eXoA">Sage Weil’s 2018 talk “Ceph, the Future of Storage” (27m)</a></p></li>
</ol>
</section>
</section>
</section>



<div id="support-the-ceph-foundation" class="admonition note">
  <p class="first admonition-title">Brought to you by the Ceph Foundation</p>
  <p class="last">The Ceph Documentation is a community resource funded and hosted by the non-profit <a href="https://ceph.io/en/foundation/">Ceph Foundation</a>. If you would like to support this and our other efforts, please consider <a href="https://ceph.io/en/foundation/join/">joining now</a>.</p>
</div>


           </div>
           
          </div>
          <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
        <a href="../" class="btn btn-neutral float-left" title="Ceph 简介" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
        <a href="../hardware-recommendations/" class="btn btn-neutral float-right" title="硬件推荐" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
    </div>

  <hr/>

  <div role="contentinfo">
    <p>&#169; Copyright 2016, Ceph authors and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).</p>
  </div>

   

</footer>
        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>